package main

import (
	"context"
	"github.com/chromedp/chromedp"
	"log"
)

func main() {

	ctx := context.Background()
	options := []chromedp.ExecAllocatorOption{
		chromedp.Flag("headless", false),
		chromedp.Flag("hide-scrollbars", false),
		chromedp.Flag("mute-audio", false),
		chromedp.UserAgent(`Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36`),
	}
	options = append(chromedp.DefaultExecAllocatorOptions[:], options...)

	c, cc := chromedp.NewExecAllocator(ctx, options...)

	defer cc()
	// create context
	ctx, cancel := chromedp.NewContext(c)
	defer cancel()
	var ua string
	err := chromedp.Run(ctx,
		chromedp.Navigate(`http://127.0.0.1:43110/1HeLLo4uzjaLetFx6NH3PMwFP3qbRbTf3D`),
		chromedp.OuterHTML("html", &ua),
	)
	if err != nil {
		log.Fatal(err)
	}

	select {}
}
